//package com.ld.poetry.utils.mail;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.boot.autoconfigure.mail.MailProperties;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Primary;
//import org.springframework.mail.javamail.JavaMailSender;
//import org.springframework.mail.javamail.JavaMailSenderImpl;
//import org.springframework.stereotype.Component;
//
//import java.util.HashMap;
//import java.util.Map;
//import java.util.Properties;
//
//@Component
//public class MailConfig {
////    @Autowired
////    private MailProperties mailProperties;
//    @Value("${spring.mail.username}")
//    private String username;
//    @Value("${spring.mail.password}")
//    private String password;
//    @Value("${spring.mail.host}")
//    private String host;
////    @Value("${spring.mail.properties}")
////    private Map<String, String> properties;
////    @Value("spring.mail.properties.mail.smtp.ssl.enable")
////    private Boolean enable;
//
//
////    @Bean(name = "javaMailSender1")
//    @Bean
//    @Primary
//    public JavaMailSender javaMailSender() {
//        JavaMailSenderImpl javaMailSender = new JavaMailSenderImpl();
//        javaMailSender.setUsername("3287149833@qq.com");
//        javaMailSender.setPassword("syfoovtjspemcihj");
//        javaMailSender.setHost(host);
//        Properties properties = new Properties();
////        Map<String, String> map = new HashMap<>();
////        map.put("mail.smtp.ssl.enable", "true");
////        properties.putAll(this.properties);
//        properties.put("mail.smtp.ssl.enable", "true");
//        javaMailSender.setJavaMailProperties(properties);
//        return javaMailSender;
//    }
//}
